using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DisplayInPlayerLos:MonoBehaviour {
	[SerializeField] GameObject toControl;

	private void Start() {
		if(!toControl) {
			HealthBar toControlScript = GetComponentInChildren<HealthBar>();
			if(toControlScript!=null) { toControl=toControlScript.gameObject; }
		}
	}
	void FixedUpdate() {
		toControl.SetActive(Player.instance.IfLineOfSight(transform.position));
	}
}
